package com.quanyan.financialSystem.web.place;

import com.quanyan.api.APIResponse;
import com.quanyan.financialSystem.entity.vo.req.ReqCashSettleReport;
import com.quanyan.financialSystem.service.place.CashSettleReportService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2016/10/22.
 */
@RestController
@RequestMapping(value = "/admin/api/financial/place/")
public class CashSettleReportController  {

    private static final Logger logger = LoggerFactory.getLogger(CashSettleReportController.class);

    @Autowired
    private CashSettleReportService cashSettleReportService;

    @RequestMapping(value = "cashSettleReport",method = RequestMethod.POST)
    public APIResponse cashSettle(@RequestBody ReqCashSettleReport reqCashSettleReport){
        try{
            return cashSettleReportService.findAllCashSettleReportPlace(reqCashSettleReport);
        }catch (Exception e){
            logger.error("{}",e);
            return APIResponse.returnFail("系统异常！");
        }

    }
}
